import argparse
import os
import config
import sys

def file_stat(f):
	tags = config.path_tags(f)

	for tag in tags:
		print('%s tagged as %s' % (f,tag))
	keywords = config.path_keywords(f)
	if keywords is not None:
		print('Description:')
		print(keywords)
		
def total_stat():
	paths = config.total_stat()
	for path in paths:
		print path	
	print('Total %d'%len(paths))

if len(sys.argv)>1:
	f = os.path.abspath(sys.argv[1])
	file_stat(f)
else:
	total_stat()
